1. Field of the Invention
The present invention relates to a semiconductor device, and more particularly, to a semiconductor device determining whether the external device is normally connected to the semiconductor device.
2. Description of Related Art
In a communication device performing serial communication with an external device, there is typically provided a connection detecting circuit determining connection status indicating whether the communication device is normally connected to the external device. FIG. 12 shows a related connection detecting circuit. In a related connection detecting circuit 120, pulse voltage is generated by a pulse generating circuit 122 so as to increase voltage of an output terminal OUT. Then a connection detection determining circuit 123 compares the voltage of the output terminal OUT and reference voltage VREF which is set to a central value of an amplitude of pulse voltage, and outputs determination signal indicating whether the external circuit 124 is normally connected to the output terminal OUT of the connection detecting circuit 120 based on the comparing result.
In the related connection detecting circuit 120, whether the external circuit 124 is normally connected to the connection detecting circuit 120 is determined by the following technique. In normal connection (see FIG. 3), the output terminal OUT is in low impedance state. Therefore, when the pulse voltage is output, the voltage of the output terminal OUT slowly increases by time constant determined by resistance R and capacitance C in the external circuit (see output terminal voltage in FIG. 3). On the other hand, in non-connecting state (see FIG. 4), the output terminal OUT is in high impedance state. Therefore, when the pulse voltage is output, the voltage of the output terminal OUT rises substantially at the same time when the pulse voltage rises, and has an amplitude value that is equal to the amplitude value of the pulse voltage (see output terminal voltage in FIG. 4). Therefore, since rising time of the output voltage is different between a case in normal connection and a case in non-connecting state, there is a difference in rising time of the detection signal output based on a result of comparing reference voltage VREF set to the central value of the amplitude of the pulse voltage with the output voltage. Therefore, the detection signal level in the determination time th is different with each other. “H” level determination signal indicating normal connection or “L” level determination signal indicating non-connecting is output to a determination signal output terminal ot. Note that FIGS. 3 and 4 each shows an operation of an ideal connection detecting circuit 120 when leak current input to the output buffer 121 is not considered.
As stated above, in the related connection detecting circuit, the connection status is determined by considering that the rising time of the voltage output to the output terminal OUT is different depending on whether the external circuit is normally connected to the output terminal OUT. Japanese Unexamined Patent Application Publication No. 2007-080134 discloses a serial communication device determining the connection status of the load based on voltage of a signal line connected between the connection detecting circuit and the load.
However, it has now been discovered that the related art causes a problem as follows. In the related connection detecting circuit 120, it can be difficult to normally determine the connection status because the leak current input to the output buffer 121 decreases output voltage of the output terminal OUT. FIG. 13 is a timing chart showing malfunction due to the leak current in normal operation in the related connection detecting circuit 120. As the leak current of the output buffer 121 increases, voltage of the output terminal OUT decreases. Therefore, the voltage of the output terminal OUT is always equal to or smaller than reference voltage VREF. Although the connection detecting circuit causes malfunction in FIG. 13, the “H” level determination signal indicating the normal connection is output since the detection signal output in a period of determination time th is the “L” level signal indicating normal operation. On the other hand, FIG. 14 is a timing chart showing false detection due to the leak current in non-connecting state. As the leak current of the output buffer 121 increases, voltage of the output terminal OUT decreases. Therefore, voltage of the output terminal OUT is always equal to or smaller than reference voltage VREF. Therefore, the “H” level determination signal indicating normal connection is output since the detection signal output in the period of determination time th is the “L” level signal indicating normal operation. As stated above, in the related connection detecting circuit, the connection status may not be normally determined.